from django.db import models

# Create your models here.
class Article(models.Model):
    title = models.CharField(max_length=100, verbose_name='博客标题')
    category = models.CharField(max_length=50, blank=True, verbose_name="博客标签")
    date_time = models.DateTimeField(auto_now_add = True, verbose_name="博客日期")
    content = models.TextField(blank = True, null = True, verbose_name="博客文章正文")

    def __str__(self):
        return self.title

    class Meta:
        ordering = ['-date_time']